package eu.szemraj.utils.time.inactivity {
   import flash.events.Event;
	
	/**
		An event dispatched from {@link Inactivity}.
		
		@author Aaron Clinger
		@version 10/27/08
	*/
	public class InactivityEvent extends Event {
		public static const INACTIVE:String  = 'inactive';
		public static const ACTIVATED:String = 'activated';
		protected var _milliseconds:uint;
		
		
		public function InactivityEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
		}
		
		public function get milliseconds():uint {
			return this._milliseconds;
		}
		
		public function set milliseconds(time:uint):void {
			this._milliseconds = time;
		}
		
		override public function toString():String {
			return formatToString('InactivityEvent', 'type', 'bubbles', 'cancelable', 'milliseconds');
		}
		
		override public function clone():Event {
			var e:InactivityEvent = new InactivityEvent(this.type, this.bubbles, this.cancelable);
			e.milliseconds        = this.milliseconds;
			
			return e;
		}
	}
}